﻿using RXY_Mall.Domain;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application.User.Dto
{
    public class UserAddInput
    {
        public Nullable<int> parent_id { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空！")]
        [RegularExpression(@"^((1[34578][0-9]{1}))\d{8}", ErrorMessage = "手机号格式不正确！")]
        public string name { get; set; }
        public string email { get; set; }
        public string logo { get; set; }
        public string nick_name { get; set; }
        public string real_name { get; set; }
        public string sex { get; set; }
        public Nullable<System.DateTime> birthday { get; set; }
        public string address { get; set; }
        public string signature { get; set; }
        public byte grade { get; set; }
        public Nullable<System.DateTime> start_time { get; set; }
        public Nullable<System.DateTime> end_time { get; set; }
        public byte status { get; set; }
        public Nullable<bool> deleted { get; set; }
        public string token { get; set; }
        public string open_id { get; set; }
        public string channel_id { get; set; }
        public string remark { get; set; }
        public string add_ip { get; set; }
        public System.DateTime add_time { get; set; }

    }
    /// <summary>
    /// 删除用户输入信息
    /// </summary>
    public class DeleteUserInput { }
    /// <summary>
    /// 修改用户输入信息
    /// </summary>
    public class UpdateUserInput { }
    /// <summary>
    /// 获取用户输出信息
    /// </summary>
    public class GetUserOutput { }
    /// <summary>
    /// 获取用户列表输出信息
    /// </summary>
    public class GetUsersOutput
    {
        [DisplayName("用户编号")]
        public int id { get; set; }
        [DisplayName("用户名")]
        public string name { get; set; }
        [DisplayName("邮箱")]
        public string email { get; set; }
        [DisplayName("头像")]
        public string logo { get; set; }
        [DisplayName("昵称")]
        public string nick_name { get; set; }
        [DisplayName("真实姓名")]
        public string real_name { get; set; }
        [DisplayName("性别")]
        public string sex { get; set; }

        public ICollection<gw_user> children { get; internal set; }
        public gw_user parent { get; internal set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime add_time;
    }
}

